<?php
class MYSQL
{
	public function __construct()
	{
		
	}

	public function Exec_query($sql, $debug = false)
	{
		if($debug)
		{
			echo $sql . "<br />";
		}
		$recordset = mysql_query($sql) or die("cannot execute query $sql ". mysql_error());
		return $recordset;
	}

	public function Get_insert_id($obj = null)
	{
		return mysql_insert_id();
	}

	public function Get_num_rows($obj)
	{
		return mysql_num_rows($obj);
	}

	public function Get_data_array($obj)
	{
		while($result = mysql_fetch_array($obj))
		{
			$data_array[] = $result;
		}
		return $data_array;
	}

	public function Get_data_array_assoc($obj)
	{
		while($result = mysql_fetch_assoc($obj))
		{
			$data_array[] = $result;
		}
		return $data_array;
	}

	public function Get_data_assoc($obj)
	{
		return mysql_fetch_assoc($obj);
	}
}
?>